Skip to content

feat: add soak tests and fix a bunch of bugs#66

Merged
alecthomas merged 10 commits intomainfrom
aat/soak-tests
Jan 28, 2026
Merged

feat: add soak tests and fix a bunch of bugs#66
alecthomas merged 10 commits intomainfrom
aat/soak-tests

Conversation

@alecthomas
Copy link
Copy Markdown
Collaborator

The soak tests run for a minute and perform a whole bunch of puts/gets/deletes of random sizes, basically stress testing the cache implementations. This revealed a bunch of bugs which have been fixed.

This runs cache backend tests through a whole bunch of testing to verify
correctness.
- Close() waits for eviction to complete before continuing, avoiding a
  "closed database" error
- Use CreateTemp() instead of +.tmp to avoid errors when concurrent
  writes occur to the same object
- Deal with another race when a file is evicted between Stat() and TTL
  loading from the database.
This is useful for backends like, eg. S3, where it's too expensive to
collect stats.
Retaining a reference to the internal buffer is not safe.
@alecthomas alecthomas requested a review from a team as a code owner January 28, 2026 09:32
@alecthomas alecthomas requested review from js-murph and removed request for a team January 28, 2026 09:32
@alecthomas alecthomas enabled auto-merge (squash) January 28, 2026 09:33
@alecthomas alecthomas merged commit 21a0002 into main Jan 28, 2026
4 of 6 checks passed
@alecthomas alecthomas deleted the aat/soak-tests branch January 28, 2026 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant